home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Game3
- Caption = "RuthieWare"
- ClientHeight = 8190
- ClientLeft = 1050
- ClientTop = 1725
- ClientWidth = 11205
- Height = 8880
- Left = 990
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MinButton = 0 'False
- ScaleHeight = 8190
- ScaleWidth = 11205
- Top = 1095
- Width = 11325
- WindowState = 1 'Minimized
- Begin Timer Timer2
- Left = 5160
- Top = 7320
- End
- Begin Timer Timer1
- Left = 4680
- Top = 7320
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 7
- Left = 120
- Picture = GAME3.FRX:0000
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 7
- Top = 7320
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 6
- Left = 120
- Picture = GAME3.FRX:0302
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 6
- Top = 6600
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 5
- Left = 120
- Picture = GAME3.FRX:0604
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 5
- Top = 5880
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Hooray
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- ForeColor = &H00000000&
- Height = 2775
- Left = 6000
- Picture = GAME3.FRX:0906
- ScaleHeight = 2775
- ScaleWidth = 3975
- TabIndex = 12
- Top = 5280
- Visible = 0 'False
- Width = 3975
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 4
- Left = 120
- Picture = GAME3.FRX:5BDA
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 4
- Top = 5160
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 11
- Left = 840
- Picture = GAME3.FRX:5EDC
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 11
- Top = 4440
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 3
- Left = 120
- Picture = GAME3.FRX:61DE
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 3
- Top = 4440
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 10
- Left = 840
- Picture = GAME3.FRX:64E0
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 10
- Top = 3720
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 2
- Left = 120
- Picture = GAME3.FRX:67E2
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 2
- Top = 3720
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 9
- Left = 840
- Picture = GAME3.FRX:6AE4
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 9
- Top = 3000
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 1
- Left = 120
- Picture = GAME3.FRX:6DE6
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 1
- Top = 3000
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 8
- Left = 840
- Picture = GAME3.FRX:70E8
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 8
- Top = 2400
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Storage
- BorderStyle = 0 'None
- Height = 495
- Index = 0
- Left = 120
- Picture = GAME3.FRX:73EA
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 0
- Top = 2400
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Picture1
- BorderStyle = 0 'None
- Height = 6135
- Left = 0
- ScaleHeight = 6135
- ScaleWidth = 8535
- TabIndex = 13
- Top = 0
- Width = 8535
- Begin PictureBox Actions
- BorderStyle = 0 'None
- Height = 615
- Left = 7200
- ScaleHeight = 615
- ScaleWidth = 1695
- TabIndex = 23
- Top = 5280
- Width = 1695
- Begin PictureBox GoToGame4
- BorderStyle = 0 'None
- Height = 495
- Left = 1200
- Picture = GAME3.FRX:76EC
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 24
- Top = 0
- Visible = 0 'False
- Width = 495
- End
- Begin PictureBox Quit
- BorderStyle = 0 'None
- Height = 495
- Left = 600
- Picture = GAME3.FRX:79EE
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 25
- Top = 0
- Width = 495
- End
- Begin PictureBox GoToGame2
- BorderStyle = 0 'None
- Height = 495
- Left = 0
- Picture = GAME3.FRX:7CF0
- ScaleHeight = 495
- ScaleWidth = 495
- TabIndex = 26
- Top = 0
- Width = 495
- End
- End
- Begin PictureBox SadFace
- BorderStyle = 0 'None
- Height = 2295
- Left = 3600
- Picture = GAME3.FRX:7FF2
- ScaleHeight = 2295
- ScaleWidth = 2295
- TabIndex = 15
- Top = 2040
- Visible = 0 'False
- Width = 2295
- End
- Begin PictureBox SourcePicture
- DragIcon = GAME3.FRX:9240
- Height = 495
- Left = 360
- Picture = GAME3.FRX:9542
- ScaleHeight = 465
- ScaleWidth = 465
- TabIndex = 14
- Top = 720
- Width = 495
- End
- Begin PictureBox Targets
- BorderStyle = 0 'None
- Height = 4095
- Left = 7800
- ScaleHeight = 4095
- ScaleWidth = 495
- TabIndex = 16
- Top = 600
- Width = 495
- Begin PictureBox Target
- Height = 495
- Index = 5
- Left = 0
- ScaleHeight = 465
- ScaleWidth = 465
- TabIndex = 17
- Top = 3600
- Width = 495
- End
- Begin PictureBox Target
- Height = 495
- Index = 4
- Left = 0
- ScaleHeight = 465
- ScaleWidth = 465
- TabIndex = 18
- Top = 2880
- Width = 495
- End
- Begin PictureBox Target
- Height = 495
- Index = 3
- Left = 0
- ScaleHeight = 465
- ScaleWidth = 465
- TabIndex = 19
- Top = 2160
- Width = 495
- End
- Begin PictureBox Target
- Height = 495
- Index = 2
- Left = 0
- ScaleHeight = 465
- ScaleWidth = 465
- TabIndex = 20
- Top = 1440
- Width = 495
- End
- Begin PictureBox Target
- Height = 495
- Index = 1
- Left = 0
- ScaleHeight = 465
- ScaleWidth = 465
- TabIndex = 21
- Top = 720
- Width = 495
- End
- Begin PictureBox Target
- Height = 495
- Index = 0
- Left = 0
- ScaleHeight = 465
- ScaleWidth = 465
- TabIndex = 22
- Top = 0
- Width = 495
- End
- End
- End
- Begin Menu File
- Caption = "&File"
- Begin Menu FileAbout
- Caption = "&About Ruthie"
- End
- Begin Menu FileExit
- Caption = "E&xit"
- End
- End
- Begin Menu Game
- Caption = "&Game"
- Begin Menu GameGame1
- Caption = "&Game &1"
- End
- Begin Menu GameGame2
- Caption = "Game &2"
- End
- Begin Menu GameGame3
- Caption = "Game &3"
- Checked = -1 'True
- End
- End
- Begin Menu Instructions
- Caption = "&Instructions"
- Begin Menu PlayGame3
- Caption = "Playing Game &3"
- End
- End
- Sub FileAbout_Click ()
- Open2.Show MODAL
- End Sub
- Sub FileExit_Click ()
- End
- End Sub
- Sub Form_Load ()
- WindowState = 0
- Scale ' Reset the scale to twips
- Height = 6600 ' Define standard size (note 3/4 proportion)
- Width = 8800
- Left = (Screen.Width - Width) / 2 ' Center form horizontally.
- Top = (Screen.Height - Height) / 2 ' Center form vertically.
- InitGame3 'Upon loading the form, initialize the pictures
- End Sub
- Sub Form_Resize ()
- Scale ' Reset scale to twips
- If Game3.Height < 6600 Then
- MsgBox "Sorry, you can't make the game any shorter...", 48, "RuthieWare"
- Game3.Height = 6600
- End If
- If Game3.Width < 8800 Then
- MsgBox "Whoa, Dude! You can't make the game any narrower...", 48, "RuthieWare"
- Game3.Width = 8800
- End If
- If Game3.Height > 100 Then InitGame3
- End Sub
- Sub GameGame1_Click ()
- Game3.Hide
- Ruthie.Show
- End Sub
- Sub GameGame2_Click ()
- Game3.Hide
- Game2.Show
- End Sub
- Sub GameGame3_Click ()
- MsgBox "We hate to break the bad news, but... You're already playing Game 3", 0, HEADER
- End Sub
- Sub GoToGame2_Click ()
- Game3.Hide
- Game2.Show
- End Sub
- Sub GoToGame4_Click ()
- MsgBox "Chu got a problem, main... There is no game 4 yet.", 0, HEADER
- End Sub
- Sub InitGame3 ()
- '*** What we need to do is initialize an array with 6 elements. We want to initialize the
- ' array in a random fashion, but we don't want the elements duplicated. That is, we want
- ' to "shuffle" the elements.
- Static TempArray(5)
- Randomize ' This "seeds" the random number generator
- ' Now we'll assign 0 to 5 to an array
- For Counter1 = 0 To 5
- TempArray(Counter1) = Counter1
- Next Counter1
- For Counter2 = 1 To 30 ' Now we'll swap 30 random pairs in that temporary array
- j = Int(Rnd * 6) ' produces a value from 0-5
- k = Int(Rnd * 6) ' sometimes these'll be the same value
- temp = TempArray(j)
- TempArray(j) = TempArray(k)
- TempArray(k) = temp
- Next Counter2
- For Counter3 = 0 To 5 ' Now we'll use the shuffled array to load the target picture array
- Target(Counter3).Picture = Storage((TempArray(Counter3) * 2)).Picture
- Next Counter3
- Temp2 = (Int(Rnd * 6) * 2) ' Now we'll pick a random picture for the source picture...
- SourcePicture.Picture = Storage(Temp2).Picture
- SourcePicture.DragIcon = Storage(Temp2 + 1).Picture ' and it's pair for the DragIcon.
- ' Some other Form_Load and Form_Resize events
- Game3.Scale (0, 0)-(100, 75) ' Define the internal scale (note the 3/4 proportion)
- Picture1.Top = 0
- Picture1.Left = 0
- Picture1.Height = Game3.ScaleHeight
- Picture1.Width = Game3.ScaleWidth
- Picture1.Scale (0, 0)-(100, 75)
- SourcePicture.Top = 8 ' No need to define height or width--it's a fixed-size icon
- SourcePicture.Left = 10
- Targets.Top = 8
- Targets.Left = 90 - Targets.Width ' Thus flush right on scale 90
- Actions.Top = 70 - Actions.Height ' Thus flush with scale 70
- Actions.Left = 90 - (Actions.Width * .66) ' Adjust visible width to hide GoToGame4
- SadFace.Top = (Picture1.ScaleHeight - SadFace.Height) / 2
- SadFace.Left = (Picture1.ScaleWidth - SadFace.Width) / 2
- Hooray.Height = Game3.ScaleHeight * .6
- Hooray.Width = Game3.ScaleHeight * .75
- Hooray.Top = (Game3.ScaleHeight - Hooray.Height) / 2
- Hooray.Left = (Game3.ScaleWidth - Hooray.Width) / 2
- Picture1.Refresh ' Force refresh of Picture1
- End Sub
- Sub Picture1_Click ()
- SadFace.Visible = True
- Timer1.Interval = HOWLONG
- End Sub
- Sub Picture1_DragDrop (Source As Control, X As Single, Y As Single)
- SadFace.Visible = -1
- Timer1.Interval = 2500
- End Sub
- Sub PlayGame3_Click ()
- InstGame3.Show MODAL
- End Sub
- Sub Quit_Click ()
- End
- End Sub
- Sub SourcePicture_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- StartX = X
- StartY = Y
- SourcePicture.Drag 1 ' Initiate drag movement
- End Sub
- Sub SourcePicture_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
- SourcePicture.Drag 2
- End Sub
- Sub Target_DragDrop (Index As Integer, Source As Control, X As Single, Y As Single)
- If SourcePicture.Picture = Target(Index).Picture Then
- Hooray.Visible = True
- InitGame3
- Timer1.Interval = HOWLONG ' Interval is defined in the (general declarations) section
- Else
- SadFace.Visible = True
- Timer1.Interval = HOWLONG
- End If
- End Sub
- Sub Timer1_Timer ()
- Hooray.Visible = False ' Turn off the Hooray! picture
- SadFace.Visible = False ' Depending on which picture was displayed, turn off SadFace...
- End Sub
- Sub Timer2_Timer ()
- SadFace.Visible = False
- End Sub
-